//
//  CarManagementCheckViewController.m
//  Qihuo
//
//  Created by Vencoo on 13-12-31.
//  Copyright (c) 2013年 Vencoo. All rights reserved.
//

#import "CarManagementCheckViewController.h"
#import "CarManageCheckCell.h"
@interface CarManagementCheckViewController ()
{

}
@end

@implementation CarManagementCheckViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    self.checkURL = resultOfCarManage;
    self.checkNames = @[@"",@"检查情况",@"",@"问题处理结果",@""];

    [super viewDidLoad];
    self.secondFloorNames = @[@[@"地面车辆停放",@"地下一层车辆停放",@"地下二层车辆停放",@"地下三层车辆停放",@"进出口车辆通行",@"其他"],@[@"照明设施",@"雨天防滑措施",@"三轴线电梯厅门状态",@"车库泛光标志及包角",@"车库进出道闸运行",@"西门通道道闸运行",@"其他"],@[@"地面车位",@"车库",@"其他"]];
    self.title = @"车库巡检记录";
}
#pragma mark - UITableViewDataSource
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *identifier = @"cell";
    CarManageCheckCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (!cell)
    {
        cell = [[CarManageCheckCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
//        UILabel *floorNameLb = [UILabel new];
//        floorNameLb.text = [[self.secondFloorNames objectAtIndex:indexPath.section]objectAtIndex:indexPath.row];
//        floorNameLb.font = [UIFont systemFontOfSize:20];
//        CGSize cgSZ = [floorNameLb.text sizeWithFont:floorNameLb.font constrainedToSize:CGSizeMake(MAXFLOAT, 40)];
//        floorNameLb.frame = CGRectMake(0, (cell.frame.size.height - cgSZ.height)/2, cgSZ.width, cgSZ.height);
//        [cell.contentView addSubview:floorNameLb];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.longFloorNameLb.text = [[self.secondFloorNames objectAtIndex:indexPath.section]objectAtIndex:indexPath.row];
    cell.resultLb.text = [[self.checkResults objectAtIndex:indexPath.section]objectAtIndex:indexPath.row];
    cell.processLb.text = [[self.chekckProcesses objectAtIndex:indexPath.section]objectAtIndex:indexPath.row];
    return cell;
}
#pragma mark - end
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
